<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Paho C++: src/mqtt/topic.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Paho C++
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">The Paho MQTT C++ Client Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('topic_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">topic.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="topic_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">/*******************************************************************************</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Copyright (c) 2013-2016 Frank Pagliughi &lt;fpagliughi@mindspring.com&gt;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * All rights reserved. This program and the accompanying materials</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * are made available under the terms of the Eclipse Public License v1.0</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * and Eclipse Distribution License v1.0 which accompany this distribution.</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * The Eclipse Public License is available at</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *    http://www.eclipse.org/legal/epl-v10.html</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * and the Eclipse Distribution License is available at</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *   http://www.eclipse.org/org/documents/edl-v10.php.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * Contributors:</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *    Frank Pagliughi - initial implementation and documentation</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#ifndef __mqtt_topic_h</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define __mqtt_topic_h</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;MQTTAsync.h&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="delivery__token_8h.html">mqtt/delivery_token.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="message_8h.html">mqtt/message.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="types_8h.html">mqtt/types.h</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span>mqtt {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">class </span>iasync_client;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html">   42</a></span>&#160;<span class="keyword">class </span><a class="code" href="classmqtt_1_1topic.html">topic</a></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;{</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <a class="code" href="classmqtt_1_1iasync__client.html">iasync_client</a>&amp; cli_;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordtype">string</span> name_;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">int</span> qos_;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">bool</span> retained_;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a5e94471a0af9ef527a90b5280c1cdf2b">   55</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="classmqtt_1_1topic.html#a5e94471a0af9ef527a90b5280c1cdf2b">ptr_t</a> = std::shared_ptr&lt;topic&gt;;</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a7501cd52070ff3e86f6f322e2c4c31fc">   57</a></span>&#160;    <span class="keyword">using</span> <a class="code" href="classmqtt_1_1topic.html#a7501cd52070ff3e86f6f322e2c4c31fc">const_ptr_t</a> = std::shared_ptr&lt;const topic&gt;;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a3f20abd05f9f841232d1ad81ecb814dd">   66</a></span>&#160;    <a class="code" href="classmqtt_1_1topic.html#a3f20abd05f9f841232d1ad81ecb814dd">topic</a>(<a class="code" href="classmqtt_1_1iasync__client.html">iasync_client</a>&amp; cli, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;          <span class="keywordtype">int</span> qos=<a class="code" href="classmqtt_1_1message.html#a9689553c0840b987f5aa064b3692e09c">message::DFLT_QOS</a>, <span class="keywordtype">bool</span> retained=<a class="code" href="classmqtt_1_1message.html#a4130d0db580fb11ee4a476712f000d48">message::DFLT_RETAINED</a>)</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        : cli_(cli), name_(name), qos_(qos), retained_(retained) {}</div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a05d1dd48249e94ae3d8c82b3a1b28372">   77</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="classmqtt_1_1topic.html#a5e94471a0af9ef527a90b5280c1cdf2b">ptr_t</a> <a class="code" href="classmqtt_1_1topic.html#a05d1dd48249e94ae3d8c82b3a1b28372">create</a>(<a class="code" href="classmqtt_1_1iasync__client.html">iasync_client</a>&amp; cli, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; name,</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                        <span class="keywordtype">int</span> qos=<a class="code" href="classmqtt_1_1message.html#a9689553c0840b987f5aa064b3692e09c">message::DFLT_QOS</a>,</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                        <span class="keywordtype">bool</span> retained=<a class="code" href="classmqtt_1_1message.html#a4130d0db580fb11ee4a476712f000d48">message::DFLT_RETAINED</a>) {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">return</span> std::make_shared&lt;topic&gt;(cli, name, qos, retained);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    }</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a20bb6ded44502aa1dd1f235883cca8bf">   86</a></span>&#160;    <a class="code" href="classmqtt_1_1iasync__client.html">iasync_client</a>&amp; <a class="code" href="classmqtt_1_1topic.html#a20bb6ded44502aa1dd1f235883cca8bf">get_client</a>() { <span class="keywordflow">return</span> cli_; }</div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a7cc52b6439851356b32459533dc96b55">   91</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; <a class="code" href="classmqtt_1_1topic.html#a7cc52b6439851356b32459533dc96b55">get_name</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name_; }</div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#aa155b7dc33fa0ef8ecace578cace2d4e">   96</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classmqtt_1_1topic.html#aa155b7dc33fa0ef8ecace578cace2d4e">get_qos</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> qos_; }</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a570c51a6a1b004aa64754102239e3116">  101</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classmqtt_1_1topic.html#a570c51a6a1b004aa64754102239e3116">get_retained</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> retained_; }</div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a1503219df15de428ff11ecc69099a9b7">  106</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1topic.html#a1503219df15de428ff11ecc69099a9b7">set_qos</a>(<span class="keywordtype">int</span> qos) { </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        <a class="code" href="classmqtt_1_1message.html#a5da9f7a3c9c437069e32f05a933a62aa">message::validate_qos</a>(qos);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        qos_ = qos; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#a6464a44498c4ceb14d7038ec45b88ab0">  114</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classmqtt_1_1topic.html#a6464a44498c4ceb14d7038ec45b88ab0">set_retained</a>(<span class="keywordtype">bool</span> retained) { retained_ = retained; }</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    delivery_token_ptr <a class="code" href="classmqtt_1_1topic.html#a245cb5fa74d692edf1f069b6cbdd2809">publish</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* payload, <span class="keywordtype">size_t</span> n);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    delivery_token_ptr <a class="code" href="classmqtt_1_1topic.html#a245cb5fa74d692edf1f069b6cbdd2809">publish</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* payload, <span class="keywordtype">size_t</span> n,</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                               <span class="keywordtype">int</span> qos, <span class="keywordtype">bool</span> retained);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    delivery_token_ptr <a class="code" href="classmqtt_1_1topic.html#a245cb5fa74d692edf1f069b6cbdd2809">publish</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    delivery_token_ptr <a class="code" href="classmqtt_1_1topic.html#a245cb5fa74d692edf1f069b6cbdd2809">publish</a>(<a class="code" href="classmqtt_1_1buffer__ref.html">binary_ref</a> payload, <span class="keywordtype">int</span> qos, <span class="keywordtype">bool</span> retained);</div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classmqtt_1_1topic.html#ae38b14f29acefc573904e4ac71e69791">  160</a></span>&#160;    <span class="keywordtype">string</span> <a class="code" href="classmqtt_1_1topic.html#ae38b14f29acefc573904e4ac71e69791">to_string</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name_; }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;};</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keyword">using</span> topic_ptr = <a class="code" href="classmqtt_1_1topic.html#a5e94471a0af9ef527a90b5280c1cdf2b">topic::ptr_t</a> ;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keyword">using</span> const_topic_ptr = <a class="code" href="classmqtt_1_1topic.html#a7501cd52070ff3e86f6f322e2c4c31fc">topic::const_ptr_t</a> ;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">// end namespace mqtt</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;}</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#endif      // __mqtt_topic_h</span></div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="preprocessor"></span></div>
<div class="ttc" id="types_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div><div class="ttdoc">Basic types and type conversions for the Paho MQTT C++ library. </div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a3f20abd05f9f841232d1ad81ecb814dd"><div class="ttname"><a href="classmqtt_1_1topic.html#a3f20abd05f9f841232d1ad81ecb814dd">mqtt::topic::topic</a></div><div class="ttdeci">topic(iasync_client &amp;cli, const string &amp;name, int qos=message::DFLT_QOS, bool retained=message::DFLT_RETAINED)</div><div class="ttdoc">Construct an MQTT topic destination for messages. </div><div class="ttdef"><b>Definition:</b> topic.h:66</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a7501cd52070ff3e86f6f322e2c4c31fc"><div class="ttname"><a href="classmqtt_1_1topic.html#a7501cd52070ff3e86f6f322e2c4c31fc">mqtt::topic::const_ptr_t</a></div><div class="ttdeci">std::shared_ptr&lt; const topic &gt; const_ptr_t</div><div class="ttdoc">A smart/shared pointer to this class. </div><div class="ttdef"><b>Definition:</b> topic.h:57</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a7cc52b6439851356b32459533dc96b55"><div class="ttname"><a href="classmqtt_1_1topic.html#a7cc52b6439851356b32459533dc96b55">mqtt::topic::get_name</a></div><div class="ttdeci">const string &amp; get_name() const </div><div class="ttdoc">Gets the name of the topic. </div><div class="ttdef"><b>Definition:</b> topic.h:91</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a570c51a6a1b004aa64754102239e3116"><div class="ttname"><a href="classmqtt_1_1topic.html#a570c51a6a1b004aa64754102239e3116">mqtt::topic::get_retained</a></div><div class="ttdeci">bool get_retained() const </div><div class="ttdoc">Gets the default retained flag used for this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:101</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a1503219df15de428ff11ecc69099a9b7"><div class="ttname"><a href="classmqtt_1_1topic.html#a1503219df15de428ff11ecc69099a9b7">mqtt::topic::set_qos</a></div><div class="ttdeci">void set_qos(int qos)</div><div class="ttdoc">Sets the default quality of service for this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:106</div></div>
<div class="ttc" id="classmqtt_1_1topic_html"><div class="ttname"><a href="classmqtt_1_1topic.html">mqtt::topic</a></div><div class="ttdoc">Represents a topic destination, used for publish/subscribe messaging. </div><div class="ttdef"><b>Definition:</b> topic.h:42</div></div>
<div class="ttc" id="message_8h_html"><div class="ttname"><a href="message_8h.html">message.h</a></div><div class="ttdoc">Declaration of MQTT message class. </div></div>
<div class="ttc" id="classmqtt_1_1buffer__ref_html"><div class="ttname"><a href="classmqtt_1_1buffer__ref.html">mqtt::buffer_ref&lt; char &gt;</a></div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a20bb6ded44502aa1dd1f235883cca8bf"><div class="ttname"><a href="classmqtt_1_1topic.html#a20bb6ded44502aa1dd1f235883cca8bf">mqtt::topic::get_client</a></div><div class="ttdeci">iasync_client &amp; get_client()</div><div class="ttdoc">Gets a reference to the MQTT client used by this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:86</div></div>
<div class="ttc" id="classmqtt_1_1iasync__client_html"><div class="ttname"><a href="classmqtt_1_1iasync__client.html">mqtt::iasync_client</a></div><div class="ttdoc">Enables an application to communicate with an MQTT server using non-blocking methods. </div><div class="ttdef"><b>Definition:</b> iasync_client.h:57</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a245cb5fa74d692edf1f069b6cbdd2809"><div class="ttname"><a href="classmqtt_1_1topic.html#a245cb5fa74d692edf1f069b6cbdd2809">mqtt::topic::publish</a></div><div class="ttdeci">delivery_token_ptr publish(const void *payload, size_t n)</div><div class="ttdoc">Publishes a message on the topic using the default QoS and retained flag. </div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a5e94471a0af9ef527a90b5280c1cdf2b"><div class="ttname"><a href="classmqtt_1_1topic.html#a5e94471a0af9ef527a90b5280c1cdf2b">mqtt::topic::ptr_t</a></div><div class="ttdeci">std::shared_ptr&lt; topic &gt; ptr_t</div><div class="ttdoc">A smart/shared pointer to this class. </div><div class="ttdef"><b>Definition:</b> topic.h:55</div></div>
<div class="ttc" id="classmqtt_1_1message_html_a4130d0db580fb11ee4a476712f000d48"><div class="ttname"><a href="classmqtt_1_1message.html#a4130d0db580fb11ee4a476712f000d48">mqtt::message::DFLT_RETAINED</a></div><div class="ttdeci">static constexpr bool DFLT_RETAINED</div><div class="ttdoc">The default retained flag. </div><div class="ttdef"><b>Definition:</b> message.h:58</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a05d1dd48249e94ae3d8c82b3a1b28372"><div class="ttname"><a href="classmqtt_1_1topic.html#a05d1dd48249e94ae3d8c82b3a1b28372">mqtt::topic::create</a></div><div class="ttdeci">static ptr_t create(iasync_client &amp;cli, const string &amp;name, int qos=message::DFLT_QOS, bool retained=message::DFLT_RETAINED)</div><div class="ttdoc">Creates a new topic. </div><div class="ttdef"><b>Definition:</b> topic.h:77</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_ae38b14f29acefc573904e4ac71e69791"><div class="ttname"><a href="classmqtt_1_1topic.html#ae38b14f29acefc573904e4ac71e69791">mqtt::topic::to_string</a></div><div class="ttdeci">string to_string() const </div><div class="ttdoc">Returns a string representation of this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:160</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_a6464a44498c4ceb14d7038ec45b88ab0"><div class="ttname"><a href="classmqtt_1_1topic.html#a6464a44498c4ceb14d7038ec45b88ab0">mqtt::topic::set_retained</a></div><div class="ttdeci">void set_retained(bool retained)</div><div class="ttdoc">Sets the default retained flag used for this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:114</div></div>
<div class="ttc" id="delivery__token_8h_html"><div class="ttname"><a href="delivery__token_8h.html">delivery_token.h</a></div><div class="ttdoc">Declaration of MQTT delivery_token class. </div></div>
<div class="ttc" id="classmqtt_1_1message_html_a5da9f7a3c9c437069e32f05a933a62aa"><div class="ttname"><a href="classmqtt_1_1message.html#a5da9f7a3c9c437069e32f05a933a62aa">mqtt::message::validate_qos</a></div><div class="ttdeci">static void validate_qos(int qos)</div><div class="ttdoc">Determines if the QOS value is a valid one. </div><div class="ttdef"><b>Definition:</b> message.h:320</div></div>
<div class="ttc" id="classmqtt_1_1message_html_a9689553c0840b987f5aa064b3692e09c"><div class="ttname"><a href="classmqtt_1_1message.html#a9689553c0840b987f5aa064b3692e09c">mqtt::message::DFLT_QOS</a></div><div class="ttdeci">static constexpr int DFLT_QOS</div><div class="ttdoc">The default QoS for a message. </div><div class="ttdef"><b>Definition:</b> message.h:56</div></div>
<div class="ttc" id="classmqtt_1_1topic_html_aa155b7dc33fa0ef8ecace578cace2d4e"><div class="ttname"><a href="classmqtt_1_1topic.html#aa155b7dc33fa0ef8ecace578cace2d4e">mqtt::topic::get_qos</a></div><div class="ttdeci">int get_qos() const </div><div class="ttdoc">Gets the default quality of service for this topic. </div><div class="ttdef"><b>Definition:</b> topic.h:96</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_503ebd9f384f44c9859dcb1451d026bc.html">mqtt</a></li><li class="navelem"><a class="el" href="topic_8h.html">topic.h</a></li>
    <li class="footer">Generated on Sun Jul 23 2017 10:24:29 for Paho C++ by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
